<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品订单状态查询管理-后台管理系统</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/css.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script>
</head>

<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="${pageContext.request.contextPath}/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">商品订单状态查询管理</a>&nbsp;-</span>&nbsp;订单状态管理
			</div>
		</div>
		<div class="page">
			<!-- opinion 页面样式 -->
			<div class="opinion">
				<!-- opinion 表格 显示 -->
				<div class="opShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="66px" class="tdColor">订单id</td>
							<td width="66px" class="tdColor">订单号</td>
							<td width="435px" class="tdColor">用户id</td>
							<td width="400px" class="tdColor">订单名</td>
							<td width="630px" class="tdColor">订单时间</td>
							<td width="66px" class="tdColor">订单状态</td>
							<td width="400px" class="tdColor">价格</td>
							<td width="66px" class="tdColor">数量</td>
							<td width="66px" class="tdColor">手机号码</td>
							<td width="435px" class="tdColor">用户名字</td>
							<td width="400px" class="tdColor">书名</td>
							<td width="130px" class="tdColor">操作</td>
						</tr>
						<c:forEach var="orders" items="${sessionScope.orders}" varStatus="v">
							<tr>
								<td>${v.count}</td>
								<td style="width:265px;">${orders["id"]}</td>
								<td>${orders["order_num"]}</td>
								<td>${orders["user_id"]}</td>
								<td>${orders["order_name"]}</td>
								<td>${orders["create_time"]}</td>
								<td>${orders["status"]}</td>
								<td>${orders["price"]}</td>
								<td>${orders["count"]}</td>
								<td>${orders["phone"]}</td>
								<td>${orders["user_name"]}</td>
								<td>${orders["goods_name"]}</td>
                                <td>
                                <img class="operation delban" src="img/delete.png" onclick="dj(${orders["id"]})">

                                </td>
							</tr>
						</c:forEach>
					</table>
					<div class="paging">
                        <table>
                            <tr>
                                <c:if test="${sessionScope.currentPage3 > 1}">
                                    <a href="${pageContext.request.contextPath }/Orders?method=findByPage&pageIndex3=${sessionScope.currentPage3 - 1}">上一页</a>
                                </c:if>
                                <c:if test="${sessionScope.currentPage3 <= 1}">
                                    <a style="background-color:gray;">上一页</a>
                                </c:if>

                                <c:forEach begin="1" end="${sessionScope.ordersPage}" varStatus="v">
                                    <a href="${pageContext.request.contextPath }/Orders?method=findByPage&pageIndex3=${v.count}">${v.count} &nbsp;</a>
                                </c:forEach>

                                <c:if test="${sessionScope.currentPage3 < sessionScope.ordersPage }">
                                    <a href="${pageContext.request.contextPath }/Orders?method=findByPage&pageIndex3=${sessionScope.currentPage3 + 1}">下一页</a>
                                </c:if>
                                <c:if test="${sessionScope.currentPage3 >= sessionScope.ordersPage}">
                                    <a style="background-color:gray;">下一页</a>
                                </c:if>
                            </tr>
                        </table>
                    </div>
				</div>
				<!-- opinion 表格 显示 end-->
			</div>
			<!-- 页面样式end -->
		</div>
	</div>

    <!-- 删除弹出框 -->
    <div class="banDel">
        <div class="delete">
            <div class="close">
                <a><img src="img/shanchu.png" /></a>
            </div>
            <p class="delP1">你确定要删除此条记录吗？</p>
            <p class="delP2">
                <a href="" id="aSub" class="ok yes">确定</a><a class="ok no">取消</a>
            </p>
        </div>
    </div>
	<%--suppress CheckValidXmlInScriptTagBody --%>
	<script>
        function dj(id) {
            document.querySelector("#aSub").href = "${pageContext.request.contextPath}/Orders?method=deleteOrders&id="+id
        }
	</script>
	<!-- 删除弹出框  end-->
</body>
<script type="text/javascript">
    // 广告弹出框
    $(".delban").click(function(){
        $(".banDel").show();
    });
    $(".close").click(function(){
        $(".banDel").hide();
    });
    $(".no").click(function(){
        $(".banDel").hide();
    });
    // 广告弹出框 end
</script>
</html>